package com.baseframe.topic.mapper;

import com.baseframe.topic.entity.SnsTestTopicUserResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**

* @description 针对表【sns_test_topic_user_result(能测成绩表)】的数据库操作Mapper
* @createDate 2023-07-10 04:46:12
* @Entity com.baseframe.topic.entity.SnsTestTopicUserResult
*/
public interface SnsTestTopicUserResultMapper extends BaseMapper<SnsTestTopicUserResult> {

    @Select("select sttur.result from sns_test_topic_user_result as sttur where sttur.is_deleted = 0 and sttur.topic_id = #{topicId} and sttur.user_id = #{userId}")
    public Integer getResultByTopicIdAndUserId(@Param("topicId") Long topicId,@Param("userId") Long userId);

    @Select("select sttur.to_account from sns_test_topic_user_result as sttur where sttur.is_deleted = 0 and sttur.topic_id = #{topicId} and sttur.user_id = #{userId}")
    public Integer getToAccountByTopicIdAndUserId(@Param("topicId") Long topicId,@Param("userId") Long userId);




}




